#include "ghToolkit.h"

    ghToolkit::system   GAME;
    ghToolkit::motion   GAME_MOTION;
    ghToolkit::entity2D fondo, disco,lista[2];
    ghToolkit::fx effects;
    ghToolkit::text text;
    ghToolkit::sound music,music2;

int dphaser = -1;
    gh2iVector2D PosDisco;
    int velocidad = 1;
    bool done;

ghMAIN
{
    GAME.init   ( ghMODE_2D );
    GAME.window ( 800, 600, 32 );
    GAME_MOTION.setMouse ( 0 );
    text.load ("tonf.ttf");
    text.color ( 255, 255, 255);
    fondo.load ( "pongo-fondo.png" );
    disco.load ( "tire.png" );
    music.load ( "skizoo.ogg");
    music2.loadfx ( "laser.wav");
    PosDisco.x = 100;
    PosDisco.y =100;


    while ( !done ) {
    GAME.clear( );

            fondo.draw ( 400, 300 );
            text.write ( velocidad, 100, 100 ) ;

            switch ( GAME_MOTION.getEvents() ) {
                case ghKEY_UP:
                    break;
                case ghKEY_DOWN:
                    music2.playfx();
                    cout << "pwed" <<endl;
                    break;
                case ghKEY_LEFT:
                    music.resume();
                    break;
                case ghKEY_RIGHT:
                       music.pause (  );
                    break;
                case ghKEY_ESCAPE:
                    done=1;
                    break;
                case ghKEY_QUIT:
                    done=1;
                    break;
            }
      GAME.flip( );
    }
    return 0;
}
